<?php
session_start();

if(isset($_SESSION['auth']))
{
    if($_SESSION['auth']==1)
    {
        header("Location: voting.php");
    }
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="style.css" rel=stylesheet type="text/css"></link>
        <title>
            Voting Title
        </title>
    </head>
    <body>
        <div id="main_wrapper">
            <div id="top_header_wrapper">
                <div id="title_top">
                     Voting
                </div>   
                <div id="login_wrapper">
                    <form name="login_form" action="Process/Process.php?task=login" method="post">
                        Username : <input name="username" type="text">
                        Password : <input name="password" type="password">
                        <input type="submit" value="Submit">
                    </form>
                </div>
            </div>
            <div id="body_wrapper">
                <div>Please Login To Voting</div><br/><br/>
                
<!--                <a style="margin-top: 10px;"href="register.php">
                        <div id="link">
                            Register
                        </div>
                </a>-->
                <p>Register</p>
                <div id="register">                      
                    <form name="registration_form" action="Process/Process.php?task=register" method="post">                        
                        <table style="margin: auto auto">
                        <tr>
                            <td>
                                Email
                            </td>
                            <td>
                                :<input name="email" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Password
                            </td>
                            <td>
                                :<input name="password" type="password"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Retype Password
                            </td>
                            <td>
                                :<input name="repass" type="password"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Nama
                            </td>
                            <td>
                                :<input name="name" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Angkatan
                            </td>
                            <td>
                                <select name="angkatan">
                                    <?php
                                    for($i=1960;$i<2012;$i++)
                                    {
                                        echo "<option value=$i>$i</option>";
                                    }
                                    ?>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="submit" value="submit"/>
                            </td>
                        </tr>
                    </table>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>
